Meridian stores date information so that it can be formatted according to the Windows locale settings of users. This may not be the format that you want used in drawing title blocks. If not, you can format the date values that are synchronized with AutoCAD attributes and MicroStation tags.
To format an attribute date value:
Click the Edit button to modify the settings.
Tip To export the settings file to a location outside the vault, click the Export button. This can be useful if you would rather edit the file in your favorite text editor. You can then copy your changes to the Clipboard and paste them into Configurator.
Locate the section in the file that begins with the block name surrounded by square brackets, for example, [MyTitleBlock] and locate the TitleBlockDateFormat setting. If the setting does not exist, you can create it. The value of this setting is options that specify how to format date and time values synchronized with attributes using the following format:
TitleBlockDateFormat = D{<DateFormat>} T{<TimeFormat>}
The date and time format options are described in the following tables. The following example formats dates like 11/03/2003:
TitleBlockDateFormat = D{dd/MM/yyyy}
The following example formats dates as 03-Mar-11.
TitleBlockDateFormat = D{yy-MMM/dd}
If you specify a format that does not include separators between the different time units (ddMMMyyyy, for example) the AutoCAD link will not be able to convert the attribute values to Meridian vault storage format because the meanings of the individual numbers will be ambiguous. To resolve this, you can provide a VBScript rule for Meridian to interpret the date format. Add the following line to the block section described above where <FunctionName> is the name of the VBScript function that you want the AutoCAD link to use to interpret the date/time attribute values in that block. The function name can be anything you want it to be. Different converter functions can be specified for each block definition.
DateTimeConverter=<FunctionName>
For example, if <FunctionName> is DateTimeConverterFunc, the VBScript function must be defined like the following example:
' BlockName - Block name passed from the AutoCAD link ' AttrName - Attribute name passed from the AutoCAD link ' DateStr - Attribute value passed from the AutoCAD link ' Result - Converted value to save as the document property value
Function DateTimeConvertorFunc(BlockName, AttrName, DateStr, Result) On Error Resume Next 'Perform your date/time conversion here Result = DateValue("25.06.2013") 'Return whether or not to use Result DateTimeConvertorFunc = True End Function
If the function returns True, the result will be used as the property value of the linked vault document. If the function returns False, the property value will not be updated.
This function is supported for AutoCAD drawings, sheet sets, and AutoCAD P&ID projects only.
The following table describes the date format options.
Characters | Description |
---|---|
d |
Day of the month as digits with no leading zero for single-digit days |
dd |
Day of the month as digits with leading zero for single-digit days |
ddd |
Day of the week as a three-letter abbreviation associated with the Windows locale |
dddd |
Day of the week as its full name associated with the Windows locale |
M |
Month as digits with no leading zero for single-digit months |
MM |
Month as digits with leading zero for single-digit months |
MMM |
Month as a three-letter abbreviation associated with the Windows locale |
MMMM |
Month as its full name associated with the Windows locale |
y |
Year as last two digits with no leading zero for years less than 10 |
yy |
Year as last two digits with leading zero for years less than 10 |
yyyy |
Year as four digits |
The following table describes the time format options.
Characters | Description |
---|---|
h |
Hours with no leading zero for single-digit hours; 12-hour clock |
hh |
Hours with leading zero for single-digit hours; 12-hour clock |
H |
Hours with no leading zero for single-digit hours; 24-hour clock |
HH |
Hours with leading zero for single-digit hours; 24-hour clock |
m |
Minutes with no leading zero for single-digit minutes |
mm |
Minutes with leading zero for single-digit minutes |
s |
Seconds with no leading zero for single-digit seconds |
ss |
Seconds with leading zero for single-digit seconds |
t |
One-character time period, such as A or P |
tt |
Two-character time period, such as AM or PM |